
<div class="indexWidth">
    <button type="button" class="btn btn-info mainButtonRight"><a
            href="javascript:takeout.openMenu('${ctxPath!}/hkcategory/list?cid=${categoryid!}', null)" class="mianAcolor">返回</a></button>

    <div class="sectionTitle">
        贺卡类型管理
        <hr>
    </div>
<form id="newsForm" name="form1" action="${ctxPath!}/hkcategory/save?cid=${categoryid!}" method="POST" class="form-horizontal" enctype="multipart/form-data">
    <input type="hidden" id="id" name="hkcategory.id" value="${hkcategory.id!}"/>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">类型名称：</label>
        <input type="text" id="According" name="hkcategory.typename" class="mainSetWidth" value="${hkcategory.typename!}" placeholder=""  valid="vtext" validname="贺卡类型名称"/>
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">类型编号：</label>
        <input type="text" id="typenumber" name="hkcategory.typenumber" class="mainSetWidth" value="${hkcategory.typenumber!}" placeholder=""  valid="vtext" validname=""/>
    </div>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">是否选中：</label>
        <input type="text" id="isselected" name="hkcategory.isselected" class="mainSetWidth" value="${hkcategory.isselected!}" placeholder=""  valid="vtext" validname=""/>
    </div>

    <div class="form-group">
        <button style="margin-left: 100px;width:95px;" class="btn btn-info articleFormButton" type="button"
                onclick="oper.save()">保存
        </button>
    </div>

    <script type="text/javascript">
        function nan(t){
            t.value=t.value.replace(/[^\d]/g,"");
        }
        var oper = {
            save:function(){
                if(!validForm()) {
                    return false;
                }
                takeout.ajaxFormMainPanel('newsForm')
                return true;
            }
        };
    </script>
    <script>
        KindEditor.ready(function(K) {
            window.editor = K.create('#news_content', {
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        K('form[name=form1]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[name=form1]')[0].submit();
                    });
                },
                afterBlur: function () { this.sync(); },
                allowImageUpload : true,
                uploadJson : '${ctxPath!}/news/uplodImg'
            });
        });
    </script>
</form>